<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * CodeIgniter
 *
 * An open source application development framework for PHP 5.1.6 or newer
 *
 * @package		CodeIgniter
 * @author		ExpressionEngine Dev Team
 * @copyright	Copyright (c) 2008 - 2011, EllisLab, Inc.
 * @license		http://codeigniter.com/user_guide/license.html
 * @link		http://codeigniter.com
 * @since		Version 1.0
 * @filesource
 */

// ------------------------------------------------------------------------

/**
 * CodeIgniter Application Controller Class
 *
 * This class object is the super class that every library in
 * CodeIgniter will be assigned to.
 *
 * @package		CodeIgniter
 * @subpackage	Libraries
 * @category	Libraries
 * @author		ExpressionEngine Dev Team
 * @link		http://codeigniter.com/user_guide/general/controllers.html
 */
class CI_Controller {

	private static $instance;

	/**
	 * Constructor
	 */
	public function __construct()
	{
		self::$instance =& $this;
		
		// Assign all the class objects that were instantiated by the
		// bootstrap file (CodeIgniter.php) to local class variables
		// so that CI can run as one big super object.
		foreach (is_loaded() as $var => $class)
		{
			$this->$var =& load_class($class);
		}

		$this->load =& load_class('Loader', 'core');

		$this->load->initialize();
		
		/*FOLDERS */
		define("DEVELOPER", "developer");
		define("SITE", "site");
		define("ADMIN", "admin");
		
		/*MODELS*/
		
	//	$this->load->model(DEVELOPER.'/Field_model' , 'mDevField' ,TRUE);
	//	$this->load->model(SITE.'/Page_model' , 'mSitePage' ,TRUE);
	//	$this->load->model(DEVELOPER.'/Adminpage_model' , 'mDevPage' ,TRUE);
		$this->load->model(DEVELOPER.'/Adminpage_permission_model' , 'mDevPagePermission' ,TRUE);
		$this->load->model(ADMIN.'/Client_model' , 'mClient' ,TRUE);
		$this->load->model(DEVELOPER.'/Users_model' , 'mDevUsers' ,TRUE);
		$this->load->model(DEVELOPER.'/Navigation_model' , 'mDevNavigation' ,TRUE);
		//	$this->load->model(DEVELOPER.'/Allowedpage_model' , 'mDevAllowedpage' ,TRUE);
	//	$this->load->model(DEVELOPER.'/Permission_model' , 'mDevPermission' ,TRUE);
	//	$this->load->model(DEVELOPER.'/Searchcriteria_model' , 'mDevSearchcriteria' ,TRUE);
	/*	$this->load->model(DEVELOPER.'/Usergroup_model' , 'mDevUsergroup' ,TRUE);
		$this->load->model(DEVELOPER.'/Users_model' , 'mDevUsers' ,TRUE);
		$this->load->model(ADMIN.'/Client_model' , 'mClient' ,TRUE);
		$this->load->model(ADMIN.'/Item_model' , 'mItem' ,TRUE);
		$this->load->model(ADMIN.'/Item_color_model' , 'mColor' ,TRUE);
		
		$this->load->model(ADMIN.'/Item_section_model' , 'mSection' ,TRUE);
		
		$this->load->model(SITE.'/Page_model' , 'mPage' ,TRUE);
	//	
	//	$this->load->model(ADMIN.'/Item_model' , 'mItem' ,TRUE);
		
		/*LIBRARIES*/
		$this->load->library('session');
		$this->load->library('parser');
		$this->load->library('form_validation');
		//$this->load->helper(array('form', 'url'));
		
		$this->load->helper(array('url'));
		$this->load->helper('inflector');
		
		//$this->load->helper(array('input'));
		//$this->load->helper('ckeditor');
		//$this->load->database();
		
		//HELPER
		
		
		log_message('debug', "Controller Class Initialized");
	}

	public static function &get_instance()
	{
		return self::$instance;
	}
}
// END Controller class

/* End of file Controller.php */
/* Location: ./system/core/Controller.php */